
package org.jetnuke.blocks;


import javax.servlet.http.HttpServletRequest;

import net.jforum.dao.DataAccessDriver;

import org.apache.velocity.VelocityContext;
import org.jetnuke.common.IAdminInfo;
import org.jetnuke.common.IBlock;
import org.jetnuke.common.IBlockInfo;
import org.jetnuke.common.IUserInfo;


public class Forums implements IBlock {

	/* (non-Javadoc)
	 * @see org.jetnuke.common.IBlock#serviceBlock(javax.servlet.http.HttpServletRequest, org.apache.velocity.VelocityContext, org.jetnuke.common.IBlockInfo, org.jetnuke.common.IUserInfo, org.jetnuke.common.IAdminInfo)
	 */
	public void serviceBlock(HttpServletRequest req, VelocityContext vc,
			IBlockInfo blockInfo, IUserInfo userInfo, IAdminInfo adminInfo)
			throws Exception {
		vc.put("topics",DataAccessDriver.getInstance().newTopicDAO().selectRecentTopics(10));
		//List topics=forum_topicsPeer.doSelect(new Criteria().addDescendingOrderByColumn(forum_topicsPeer.TOPIC_TIME).setLimit(10));
		//vc.put("topics",topics);

	}

}
